// Copyright (c) 2025, 大连理工大学 (Dalian University of Technology)
//
// Licensed under the Mulan PSL v2.
// You can use this file according to the terms and conditions of the Mulan PSL v2.
// You may obtain a copy of the License at
//
//     http://license.coscl.org.cn/MulanPSL2
//
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. SEE THE MULAN PSL v2
// FOR MORE DETAILS.

/*
 * @Author: qiulin 1746365080@qq.com
 * @Date: 2024-10-24 14:51:52
 * @LastEditors: qiulin_JXGM ql1746365080@gmail.com
 * @LastEditTime: 2024-12-06 19:57:19
 * @FilePath: /SGSim/DBManager/UnitTest/HDF5/Input/I_PropertyTest.cpp
 */

#include <vector>

#include <gtest/gtest.h>

#include "DBManager/IService/Input/Property/IPBARLService.h"
#include "DBManager/IService/Input/Property/IPBARService.h"
#include "DBManager/IService/Input/Property/IPBEAMLService.h"
#include "DBManager/IService/Input/Property/IPBEAMService.h"
#include "DBManager/IService/Input/Property/IPBRSECTService.h"
#include "DBManager/IService/Input/Property/IPBUSHService.h"
#include "DBManager/IService/Input/Property/IPCOMPService.h"
#include "DBManager/IService/Input/Property/IPCONVService.h"
#include "DBManager/IService/Input/Property/IPELASService.h"
#include "DBManager/IService/Input/Property/IPHBDYService.h"
#include "DBManager/IService/Input/Property/IPMASSService.h"
#include "DBManager/IService/Input/Property/IPRODService.h"
#include "DBManager/IService/Input/Property/IPSHEARService.h"
#include "DBManager/IService/Input/Property/IPSHELLService.h"
#include "DBManager/IService/Input/Property/IPSOLIDService.h"
#include "DBManager/IService/Input/Property/IPropertySummaryService.h"
#include "DBManager/UnitTest/HDF5/TestDB.h"

using namespace SG::DataStructure::FEM;
using namespace SG::DBManager;

class I_PropertyTest : public testing::Test
{
  public:
    static void SetUpTestSuite ()
    {
        if (DB::ServiceFactory != nullptr)
        {
            DB::ServiceFactory->ClearDatabase ();
        }
    }
};

TEST_F (I_PropertyTest, PBUSHData)
{
    SG::DataStructure::Common::Id const id = 1;

    // 创建对象
    PBUSHData obj;
    obj.m_id = id;

    // 获取服务
    auto service = DB::ServiceFactory->get<IPBUSHService> ();
    // 添加对象
    service->Add (obj);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->FindById (id, obj), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (obj.m_id, id);
    ASSERT_EQ (service->GetAllId ().size (), 1);
}

TEST_F (I_PropertyTest, PELASData)
{
    SG::DataStructure::Common::Id const id = 2;

    // 创建对象
    PELASData obj;
    obj.m_id = id;

    // 获取服务
    auto service = DB::ServiceFactory->get<IPELASService> ();
    // 添加对象
    service->Add (obj);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->FindById (id, obj), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (obj.m_id, id);
}

TEST_F (I_PropertyTest, PRODData)
{
    SG::DataStructure::Common::Id const id = 3;

    // 创建对象
    PRODData obj;
    obj.m_id = id;

    // 获取服务
    auto service = DB::ServiceFactory->get<IPRODService> ();
    // 添加对象
    service->Add (obj);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->FindById (id, obj), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (obj.m_id, id);
}

TEST_F (I_PropertyTest, PBARData)
{
    SG::DataStructure::Common::Id const id = 4;

    // 创建对象
    PBARData obj;
    obj.m_id = id;

    // 获取服务
    auto service = DB::ServiceFactory->get<IPBARService> ();
    // 添加对象
    service->Add (obj);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->FindById (id, obj), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (obj.m_id, id);
}

TEST_F (I_PropertyTest, PBARLData)
{
    SG::DataStructure::Common::Id const id = 5;

    // 创建对象
    PBARLData obj;
    obj.m_id        = id;
    obj.m_dimension = { 1.0 };
    obj.m_type[0]   = 'R';
    obj.m_type[1]   = 'O';
    obj.m_type[2]   = 'D';
    obj.m_nsm       = 666;
    // 获取服务
    auto service = DB::ServiceFactory->get<IPBARLService> ();
    // 添加对象
    service->Add (obj);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->FindById (id, obj), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (obj.m_id, id);
    ASSERT_EQ (obj.m_nsm, 666);
}

TEST_F (I_PropertyTest, PSHELLData)
{
    SG::DataStructure::Common::Id const id = 6;

    // 创建对象
    PSHELLData obj;
    obj.m_id = id;

    // 获取服务
    auto service = DB::ServiceFactory->get<IPSHELLService> ();
    // 添加对象
    service->Add (obj);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->FindById (id, obj), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (obj.m_id, id);
}

TEST_F (I_PropertyTest, PCOMPData)
{
    SG::DataStructure::Common::Id const id = 7;

    // 创建对象
    PCOMPData obj;
    obj.m_id      = id;
    obj.m_lam     = LaminateOption_BEND;
    obj.m_secData = { { 1, 2, 3, 4 } };
    // 获取服务
    auto service = DB::ServiceFactory->get<IPCOMPService> ();
    // 添加对象
    service->Add (obj);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->FindById (id, obj), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (obj.m_id, id);
}

TEST_F (I_PropertyTest, PSOLIDData)
{
    SG::DataStructure::Common::Id const id = 8;

    // 创建对象
    PSOLIDData obj;
    obj.m_id = id;

    // 获取服务
    auto service = DB::ServiceFactory->get<IPSOLIDService> ();
    // 添加对象
    service->Add (obj);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->FindById (id, obj), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (obj.m_id, id);
}

TEST_F (I_PropertyTest, PSHEARData)
{
    SG::DataStructure::Common::Id const id = 9;

    // 创建对象
    PSHEARData obj;
    obj.m_id = id;

    // 获取服务
    auto service = DB::ServiceFactory->get<IPSHEARService> ();
    // 添加对象
    service->Add (obj);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->FindById (id, obj), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (obj.m_id, id);
}

TEST_F (I_PropertyTest, PMASSData)
{
    SG::DataStructure::Common::Id const id = 10;

    // 创建对象
    PMASSData obj;
    obj.m_id = id;

    // 获取服务
    auto service = DB::ServiceFactory->get<IPMASSService> ();
    // 添加对象
    service->Add (obj);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->FindById (id, obj), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (obj.m_id, id);
}

TEST_F (I_PropertyTest, PBEAMData)
{
    SG::DataStructure::Common::Id const id = 11;

    // 创建对象
    PBEAMData obj;
    obj.m_id = id;

    // 获取服务
    auto service = DB::ServiceFactory->get<IPBEAMService> ();
    // 添加对象
    service->Add (obj);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->FindById (id, obj), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (obj.m_id, id);
}

TEST_F (I_PropertyTest, PBEAMLData)
{
    SG::DataStructure::Common::Id const id = 12;

    // 创建对象
    PBEAMLData obj;
    obj.m_id = id;

    SG::DataStructure::FEM::PBEAMLData::section Sec;
    Sec.m_dims = { 1.0, 2.0 };
    obj.m_section.push_back (Sec);
    // 获取服务
    auto service = DB::ServiceFactory->get<IPBEAMLService> ();
    // 添加对象
    service->Add (obj);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->FindById (id, obj), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (obj.m_id, id);
}

TEST_F (I_PropertyTest, PCONVData)
{
    SG::DataStructure::FEM::Id const id = 13;

    // 创建对象
    PCONVData obj;
    obj.m_id = id;

    // 获取服务
    auto service = DB::ServiceFactory->get<IPCONVService> ();
    // 添加对象
    ASSERT_EQ (service->Add (obj), SG::DataStructure::Common::Status::STATUS_Success);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->FindById (id, obj), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (obj.m_id, id);
}

TEST_F (I_PropertyTest, PHBDYData)
{
    SG::DataStructure::FEM::Id const id = 113;

    // 创建对象
    PHBDYData obj;
    obj.m_id = id;

    // 获取服务
    auto service = DB::ServiceFactory->get<IPHBDYService> ();
    // 添加对象
    service->Add (obj);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->FindById (id, obj), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (obj.m_id, id);
}

#include "DBManager/IService/Input/Property/IPCOMPFQService.h"
TEST_F (I_PropertyTest, PCOMPFQTest)
{
    auto service = DB::ServiceFactory->get<IPCOMPFQService> ();

    SG::DataStructure::FEM::PCOMPFQData data;
    data.m_id = 14;
    service->Add (data);

    SG::DataStructure::FEM::PCOMPFQData _OUT outData;
    service->FindById (14, outData);
    ASSERT_EQ (outData.m_id, 14);

    ASSERT_EQ (service->FindByIndex (0, outData), SG::DataStructure::Common::Status::STATUS_Success);

    ASSERT_EQ (outData.m_id, 14);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->Count (14), 1);
}

#include "DBManager/IService/Input/Property/IPDAMPService.h"
TEST_F (I_PropertyTest, PDAMPTest)
{
    auto service = DB::ServiceFactory->get<IPDAMPService> ();

    SG::DataStructure::FEM::PDAMPData data;
    data.m_id = 15;
    service->Add (data);

    SG::DataStructure::FEM::PDAMPData _OUT outData;
    service->FindById (15, outData);
    ASSERT_EQ (outData.m_id, 15);

    ASSERT_EQ (service->FindByIndex (0, outData), SG::DataStructure::Common::Status::STATUS_Success);

    ASSERT_EQ (outData.m_id, 15);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->Count (15), 1);
}

#include "DBManager/IService/Input/Property/IPELASTService.h"
TEST_F (I_PropertyTest, PELASTTest)
{
    auto service = DB::ServiceFactory->get<IPELASTService> ();

    SG::DataStructure::FEM::PELASTData data;
    data.m_id = 16;
    service->Add (data);

    SG::DataStructure::FEM::PELASTData _OUT outData;
    service->FindById (16, outData);
    ASSERT_EQ (outData.m_id, 16);

    ASSERT_EQ (service->FindByIndex (0, outData), SG::DataStructure::Common::Status::STATUS_Success);

    ASSERT_EQ (outData.m_id, 16);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->Count (16), 1);
}

#include "DBManager/IService/Input/Property/IPFASTService.h"
TEST_F (I_PropertyTest, PFASTTest)
{
    auto service = DB::ServiceFactory->get<IPFASTService> ();

    SG::DataStructure::FEM::PFASTData data;
    data.m_id = 17;
    ASSERT_EQ (service->Add (data), SG::DataStructure::Common::Status::STATUS_Success);

    SG::DataStructure::FEM::PFASTData _OUT outData;
    ASSERT_EQ (service->FindById (17, outData), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (outData.m_id, 17);

    ASSERT_EQ (service->FindByIndex (0, outData), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (outData.m_id, 17);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->Count (17), 1);
}

#include "DBManager/IService/Input/Property/IPFASTTService.h"
TEST_F (I_PropertyTest, PFASTTTest)
{
    auto service = DB::ServiceFactory->get<IPFASTTService> ();

    SG::DataStructure::FEM::PFASTTData data;
    data.m_id = 18;
    service->Add (data);

    SG::DataStructure::FEM::PFASTTData _OUT outData;
    service->FindById (18, outData);
    ASSERT_EQ (outData.m_id, 18);

    ASSERT_EQ (service->FindByIndex (0, outData), SG::DataStructure::Common::Status::STATUS_Success);

    ASSERT_EQ (outData.m_id, 18);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->Count (18), 1);
}

#include "DBManager/IService/Input/Property/IPVISCService.h"
TEST_F (I_PropertyTest, PVISCTest)
{
    auto service = DB::ServiceFactory->get<IPVISCService> ();

    SG::DataStructure::FEM::PVISCData data;
    data.m_id = 19;
    service->Add (data);

    SG::DataStructure::FEM::PVISCData _OUT outData;
    service->FindById (19, outData);
    ASSERT_EQ (outData.m_id, 19);

    ASSERT_EQ (service->FindByIndex (0, outData), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (outData.m_id, 19);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->Count (19), 1);
}

#include "DBManager/IService/Input/Property/IPDISTBService.h"
TEST_F (I_PropertyTest, PDISTBTest)
{
    auto service = DB::ServiceFactory->get<IPDISTBService> ();

    SG::DataStructure::FEM::PDISTBData data;
    data.m_id = 1;
    ASSERT_EQ (service->Add (data), SG::DataStructure::Common::Status::STATUS_Success);

    SG::DataStructure::FEM::PDISTBData _OUT outData;
    ASSERT_EQ (service->FindById (1, outData), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (outData.m_id, 1);

    ASSERT_EQ (service->FindByIndex (0, outData), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (outData.m_id, 1);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->Count (1), 1);
}

#include "DBManager/IService/Input/Property/IPDISTBMService.h"
TEST_F (I_PropertyTest, PDISTBMTest)
{
    auto service = DB::ServiceFactory->get<IPDISTBMService> ();

    SG::DataStructure::FEM::PDISTBMData data;
    data.m_id = 1;
    ASSERT_EQ (service->Add (data), SG::DataStructure::Common::Status::STATUS_Success);

    SG::DataStructure::FEM::PDISTBMData _OUT outData;
    ASSERT_EQ (service->FindById (1, outData), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (outData.m_id, 1);

    ASSERT_EQ (service->FindByIndex (0, outData), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (outData.m_id, 1);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->Count (1), 1);
}

#include "DBManager/IService/Input/Property/IPWELDService.h"
TEST_F (I_PropertyTest, PWELDTest)
{
    auto service = DB::ServiceFactory->get<IPWELDService> ();

    SG::DataStructure::FEM::PWELDData data;
    data.m_id = 199;
    service->Add (data);

    SG::DataStructure::FEM::PWELDData _OUT outData;
    service->FindById (data.m_id, outData);
    ASSERT_EQ (outData.m_id, data.m_id);

    ASSERT_EQ (service->FindByIndex (0, outData), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (outData.m_id, data.m_id);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->Count (data.m_id), 1);
}

#define FUNCTION_ADD_PROPERTY_DATA(PROTYPE)                                                         \
    void add##PROTYPE##Data (SG::DBManager::DBServiceFactory* db, SG::DataStructure::Common::Id id) \
    {                                                                                               \
        auto          service = db->get<I##PROTYPE##Service> ();                                    \
        PROTYPE##Data obj;                                                                          \
        obj.m_id = id;                                                                              \
        service->Add (obj);                                                                         \
    }

FUNCTION_ADD_PROPERTY_DATA (PWELD)
FUNCTION_ADD_PROPERTY_DATA (PCONV)
FUNCTION_ADD_PROPERTY_DATA (PMASS)
FUNCTION_ADD_PROPERTY_DATA (PSHEAR)
FUNCTION_ADD_PROPERTY_DATA (PSOLID)
FUNCTION_ADD_PROPERTY_DATA (PCOMP)
FUNCTION_ADD_PROPERTY_DATA (PSHELL)
FUNCTION_ADD_PROPERTY_DATA (PBARL)
FUNCTION_ADD_PROPERTY_DATA (PBAR)
FUNCTION_ADD_PROPERTY_DATA (PROD)
FUNCTION_ADD_PROPERTY_DATA (PELAS)
FUNCTION_ADD_PROPERTY_DATA (PBUSH)
FUNCTION_ADD_PROPERTY_DATA (PBRSECT)

TEST_F (I_PropertyTest, PropertySummaryService)
{
    DB::ServiceFactory->ClearDatabase ();
    addPBRSECTData (DB::ServiceFactory, 200);
    addPWELDData (DB::ServiceFactory, 199);
    addPCONVData (DB::ServiceFactory, 13);
    addPMASSData (DB::ServiceFactory, 10);
    addPSHEARData (DB::ServiceFactory, 9);
    addPSOLIDData (DB::ServiceFactory, 8);
    addPCOMPData (DB::ServiceFactory, 7);
    addPSHELLData (DB::ServiceFactory, 6);
    addPBARLData (DB::ServiceFactory, 5);
    addPBARData (DB::ServiceFactory, 4);
    addPRODData (DB::ServiceFactory, 3);
    addPELASData (DB::ServiceFactory, 2);
    addPBUSHData (DB::ServiceFactory, 1);

    auto service = DB::ServiceFactory->get<IPropertySummaryService> ();

    ASSERT_EQ (service->GetPropertyType (200), SG::DataStructure::FEM::PropertyTypes::PROTYPE_PBRSECT);
    ASSERT_EQ (service->GetPropertyType (199), SG::DataStructure::FEM::PropertyTypes::PROTYPE_PWELD);
    ASSERT_EQ (service->GetPropertyType (13), SG::DataStructure::FEM::PropertyTypes::PROTYPE_PCONV);
    ASSERT_EQ (service->GetPropertyType (10), SG::DataStructure::FEM::PropertyTypes::PROTYPE_PMASS);
    ASSERT_EQ (service->GetPropertyType (9), SG::DataStructure::FEM::PropertyTypes::PROTYPE_PSHEAR);
    ASSERT_EQ (service->GetPropertyType (8), SG::DataStructure::FEM::PropertyTypes::PROTYPE_PSOLID);
    ASSERT_EQ (service->GetPropertyType (7), SG::DataStructure::FEM::PropertyTypes::PROTYPE_PCOMP);
    ASSERT_EQ (service->GetPropertyType (6), SG::DataStructure::FEM::PropertyTypes::PROTYPE_PSHELL);
    ASSERT_EQ (service->GetPropertyType (5), SG::DataStructure::FEM::PropertyTypes::PROTYPE_PBARL);
    ASSERT_EQ (service->GetPropertyType (4), SG::DataStructure::FEM::PropertyTypes::PROTYPE_PBAR);
    ASSERT_EQ (service->GetPropertyType (3), SG::DataStructure::FEM::PropertyTypes::PROTYPE_PROD);
    ASSERT_EQ (service->GetPropertyType (2), SG::DataStructure::FEM::PropertyTypes::PROTYPE_PELAS);
    ASSERT_EQ (service->GetPropertyType (1), SG::DataStructure::FEM::PropertyTypes::PROTYPE_PBUSH);
}

#include "DBManager/IService/Input/Property/IPCOMPGService.h"
TEST_F (I_PropertyTest, PCOMPGTest)
{
    DB::ServiceFactory->ClearDatabase ();
    SG::DataStructure::Common::Id Id = 2354;

    auto service = DB::ServiceFactory->get<IPCOMPGService> ();

    SG::DataStructure::FEM::PCOMPGData data;
    data.m_id = Id;
    ASSERT_EQ (service->Add (data), SG::DataStructure::Common::Status::STATUS_Success);

    SG::DataStructure::FEM::PCOMPGData _OUT outData;
    ASSERT_EQ (service->FindById (Id, outData), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (outData.m_id, Id);

    ASSERT_EQ (service->FindByIndex (0, outData), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (outData.m_id, Id);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->Count (Id), 1);
}

TEST_F (I_PropertyTest, IPBRSECTTest)
{
    DB::ServiceFactory->ClearDatabase ();
    SG::DataStructure::Common::Id Id = 2354;

    auto service = DB::ServiceFactory->get<IPBRSECTService> ();

    SG::DataStructure::FEM::PBRSECTData data;
    data.m_id = Id;

    SG::DataStructure::FEM::PBRSECTData::section s;
    s.ings.push_back ({ 2, 3 });
    s.ings.push_back ({ 3, 4 });
    s.inps.push_back ({ 5, 6 });
    s.inps.push_back ({ 7, 8 });
    s.OHEIGHT = 1.3;
    s.OWIDTH = 2.4;
    data.m_sections.push_back (s);
    ASSERT_EQ (service->Add (data), SG::DataStructure::Common::Status::STATUS_Success);

    SG::DataStructure::FEM::PBRSECTData _OUT outData;
    ASSERT_EQ (service->FindById (Id, outData), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (outData.m_id, Id);

    ASSERT_EQ (service->FindByIndex (0, outData), SG::DataStructure::Common::Status::STATUS_Success);
    ASSERT_EQ (outData.m_id, Id);

    ASSERT_EQ (service->Size (), 1);
    ASSERT_EQ (service->Count (Id), 1);

    ASSERT_EQ (outData.m_sections.size(), 1);
    ASSERT_EQ (outData.m_sections[0].ings.size(), 2);
    ASSERT_EQ (outData.m_sections[0].inps.size(), 2);

    ASSERT_NEAR (outData.m_sections[0].OHEIGHT, 1.3, SG::DataStructure::Common::TOLERANCE);
    ASSERT_NEAR (outData.m_sections[0].OWIDTH, 2.4, SG::DataStructure::Common::TOLERANCE);

    ASSERT_EQ (outData.m_sections[0].inps[0].EXTID, 5);
    ASSERT_EQ (outData.m_sections[0].inps[0].ID, 6);
    ASSERT_EQ (outData.m_sections[0].ings[0].EXTID, 2);
    ASSERT_EQ (outData.m_sections[0].ings[0].ID, 3);
}
